package gui.batches;

import gui.item.ItemData;
import gui.product.ProductData;

public interface IBatchView {

	/**
	 * Sets the products displayed in the "Products" table.
	 * 
	 * @param products Array of products to display
	 */
	public abstract void setProducts(ProductData[] products);

	/**
	 * Returns the currently selected product in the "Products" table,
	 * or null if no product is selected.
	 */
	public abstract ProductData getSelectedProduct();

	/**
	 * Selects the specified product in the "Products" table, or selects
	 * nothing if product is null.
	 * 
	 * @param product The product to be selected.  This must be one of the products
	 * previously passed to setProducts, or null.
	 */
	public abstract void selectProduct(ProductData product);

	/**
	 * Sets the items displayed in the "Items" table.
	 * 
	 * @param items Array of items to display
	 */
	public abstract void setItems(ItemData[] items);

	/**
	 * Displays an "error" message to the user.
	 * 
	 * @param message message text
	 * 
	 * {@pre message != null}
	 * 
	 * {@post The user has viewed the error message.}
	 */
	public abstract void displayErrorMessage(String message);
}